<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加代理商</title>
    <!--bootstrap-select  css文件-->
    <link rel="stylesheet" type="text/css" href="js/bootstrapselect/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="js/bootstrapselect/css/bootstrap-select.css"/>
    <!--日期  css文件-->
    <link rel="stylesheet" type="text/css" href="js/datepicker/css/bootstrap-datepicker.css">
    <!--弹窗 css文件-->
    <link rel="stylesheet" type="text/css" href="js/layer/layer.css">
    <!--图片点击放大  css文件-->
    <link rel="stylesheet" href="js/viewer/css/viewer.min.css">
    <!--主要css样式-->
    <link rel="stylesheet" type="text/css" href="css/models.css">
    <style>
        .addList li .bootstrap-select.btn-group:not(.input-group-btn), .addList li .bootstrap-select.btn-group[class*="col-"] {
            width: 15%;
        }
        .addList li input[type="text"], .addList li input[type="password"] {
            width:31%;
        }
        .addList li {
            margin-bottom: 21px;
        }
    </style>
</head>
<body>
<!--添加编辑资讯弹窗-->
<form id="formID">
    <ul class="addList">
        <li>
            <label for=""><span class="require">*</span>企业名称：</label>
            <input class="validate[required]" name="" type="text" placeholder="请输入商品名称，10字以内">
        </li>
        <li>
            <label for=""><span class="require">*</span>代理商账号：</label>
            <input class="validate[required]" name="" type="text" placeholder="有效的手机号码">
        </li>
        <li>
            <label for=""><span class="require">*</span>上传LOGO：</label>
            <div class="filePhoto uploadImg" id="imageSection">
                <section class="fileBox left">
                    <img src="images/add.png" class="add-img"> <input
                        type="file" name="file" id="file" class="fileImg" value=""
                        accept="image/jpg,image/jpeg,image/png,image/bmp" multiple/>
                </section>
            </div>
        </li>
        <li>
            <label for=""><span class="require">*</span>代理区域：</label>
            <select class="selectpicker validate[required]">
                <option value="">请选择省</option>
                <option value="">重庆</option>
                <option value="">四川</option>
            </select>
            <select class="selectpicker validate[required]">
                <option value="">请选择市</option>
                <option value="">重庆</option>
                <option value="">成都</option>
            </select>
        </li>
        <li>
            <label for=""><span class="require">*</span>联系电话：</label>
            <input class="validate[required]" name="" type="text" placeholder="有效的手机号码">
        </li>
        <li>
            <label for=""><span class="require">*</span>联系地址：</label>
            <select class="selectpicker validate[required]">
                <option value="">请选择省</option>
                <option value="">重庆</option>
                <option value="">四川</option>
            </select>
            <select class="selectpicker validate[required]">
                <option value="">请选择市</option>
                <option value="">重庆</option>
                <option value="">成都</option>
            </select>
            <select class="selectpicker validate[required]">
                <option value="">请选择省</option>
                <option value="">重庆</option>
                <option value="">四川</option>
            </select>
            <select class="selectpicker validate[required]">
                <option value="">请选择市</option>
                <option value="">重庆</option>
                <option value="">成都</option>
            </select>
        </li>
        <li>
            <label for=""></label>
            <input name="" type="text" placeholder='请输入详细地址' class="validate[required]"/>
        </li>
        <li>
            <label for=""><span class="require">*</span>营业执照：</label>
            <div class="filePhoto uploadImg">
                <section class="fileBox left">
                    <img src="images/add.png" class="add-img">
                    <input type="file" name="file" id="file1" class="fileImg" value=""
                           accept="image/jpg,image/jpeg,image/png,image/bmp" multiple/>
                </section>
            </div>
        </li>
        <li>
            <label for=""><span class="require">*</span>法人身份证：</label>
            <div class="filePhoto uploadImg">
                <section class="fileBox left">
                    <img src="images/add.png" class="add-img">
                    <input type="file" name="file" id="file2" class="fileImg" value=""
                           accept="image/jpg,image/jpeg,image/png,image/bmp" multiple/>
                </section>
            </div>
        </li>
        <li>
            <label for="">其他证件：</label>
            <div class="filePhoto uploadImg">
                <section class="fileBox left">
                    <img src="images/add.png" class="add-img">
                    <input type="file" name="file" id="file3" class="fileImg" value=""
                           accept="image/jpg,image/jpeg,image/png,image/bmp" multiple/>
                </section>
            </div>
        </li>
    </ul>
</form>
<!--end 添加编辑资讯弹窗-->
<div class="PopupBtn">
    <input class="submit" name="" value="保存" type="button">
    <input class="cancel" name="" value="取消" type="button" onclick="cancel();">
</div>
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<!--bootstrap-select-->
<script type="text/javascript" src="js/bootstrapselect/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrapselect/bootstrap-select.js"></script>
<script type="text/javascript" src="js/bootstrapselect/select.js"></script>
<!--验证-->
<script type="text/javascript" src="js/validat/jquery.validationEngine-zh_CN.js"></script>
<script type="text/javascript" src="js/validat/jquery.validationEngine.js"></script>
<!--图片上传-->
<script type="text/javascript" src="js/imgUp.js"></script>
<!--分页-->
<script type="text/javascript" src="js/pages/jquery.dataTables.min.js"></script>
<!--弹窗-->
<script type="text/javascript" src="js/layer/layer.js"></script>
<!--图片点击放大-->
<script src="js/viewer/viewer-jquery.min.js"></script>

<script type="text/javascript">
    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
    //关闭iframe
    function cancel() {
        layer.confirm('是否放弃本次编辑，不对数据进行保存?', {
            icon: 3,
            btn: ['确定', '返回'],
            btnAlign: 'c',
            closeBtn: 0,
            btn1: function () {
                parent.layer.close(index);
                window.location.href = "jxf_commodity_list.html";
            },
            btn2: function (index) {
                layer.close(index);
            }
        });
    }

    $(function () {
        $("#formID").validationEngine({
            addPromptClass: 'formError-text',
            showArrow: false,
            promptPosition: 'bottomLeft:10 0'
        });
        //图片点击放大
        $('.zoom-img').viewer({
            url: 'src',
            navbar: false,
            keyboard: true,
            title: true
        });
        //logo上传
        $("#file1").takungaeImgup({
            formData: {
                'module': 'product',
                'name': 'url',
                'filesname': 'urlfile'
            },
            url: 'http://123.206.8.92:7000/web/attachment/uploadProductImage',
            maxImage: 1,
            success: function (data) {

            },
            error: function (err) {
                layer.alert(err, {icon: 2, btnAlign: 'c', closeBtn: 0});
            }
        });
        //图片上传

        $("#file2").takungaeImgup({
            formData: {
                'module': 'product',
                'name': 'url',
                'filesname': 'urlfile'
            },
            url: 'http://123.206.8.92:7000/web/attachment/uploadProductImage',
            maxImage: 2,
            success: function (data) {

            },
            error: function (err) {
                layer.alert(err, {icon: 2, btnAlign: 'c', closeBtn: 0});
            }
        });
        $("#file3").takungaeImgup({
            formData: {
                'module': 'product',
                'name': 'url',
                'filesname': 'urlfile'
            },
            url: 'http://123.206.8.92:7000/web/attachment/uploadProductImage',
            maxImage: 5,
            success: function (data) {

            },
            error: function (err) {
                layer.alert(err, {icon: 2, btnAlign: 'c', closeBtn: 0});
            }
        });
    });
</script>
</body>
</html>